<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生交作业</title>
<script type="text/JavaScript">
    function downloadfile(name){  
       window.self.location="download?fileName="+encodeURIComponent(name);
    }  
</script>
<style type="text/css">
.msg {
	border: 1px solid #F00;
	margin: 10px;
}

#upload {
	margin: 30px;
}
</style>
</head>
<body>
	<div class="msg">
		学生学号:${student.uid }<br /> 学生名字：${student.username } <br />本&nbsp;机&nbsp;IP：${student.computername }
		<br />作业情况：<a href="#" onclick="javascript:downloadfile('${student.homework}')">${student.homework}</a><br />
		文档大小：${student.filesize }K <br />好评指数：${student.good }
	</div>
	<div class="msg">
		<h3>上课资料！</h3>
		<br />
		<c:forEach items="${download }" var="dl">
			<a href="#" onclick="javascript:downloadfile('${dl.url}')">${dl.url}</a>
			<br />
		</c:forEach>
	</div>
	<div id="upload">
		<form action="upload" method="post" enctype="multipart/form-data">
			输入作业文档<input type="hidden" name="username" readonly="readonly"
				value="${student.username }" /> <input type="hidden" name="uid"
				readonly="readonly" value="${student.uid }" /> <input type="file"
				name="attach" /> <input type="submit" value="上交作业" />
		</form>
	</div>
</body>
</html>